/// ========================================================================
/// Datetimepicker: datetimepicker.less
/// https://github.com/smalot/bootstrap-datetimepicker/blob/master/less/datetimepicker.less
///
/// ZUI: The file has been changed in ZUI. It will not keep update with the
/// official version in the future.
/// http://openzui.com
/// ========================================================================
/// Datetimepicker: Licensed under the Apache License v2.0
/// http://www.apache.org/licenses/LICENSE-2.0
/// Copyright 2012 Stefan Petre
/// ========================================================================


/*!
 * Datetimepicker for Bootstrap
 * Copyright 2012 Stefan Petre
 * Licensed under the Apache License v2.0
 */

.datetimepicker {
  padding: 4px;
  margin-top: 1px;
  white-space: normal;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  direction: ltr;
  &.datetimepicker-rtl {
    direction: rtl;
    table {
      tr {
        td {
          span {
            float: right;
          }
        }
      }
    }
  }
  & > div {
    display: none;
  }
  &.minutes {
    div {
      &.datetimepicker-minutes {
        display: block;
      }
    }
  }
  &.hours {
    div {
      &.datetimepicker-hours {
        display: block;
      }
    }
  }
  &.days {
    div {
      &.datetimepicker-days {
        display: block;
      }
    }
  }
  &.months {
    div {
      &.datetimepicker-months {
        display: block;
      }
    }
  }
  &.years {
    div {
      &.datetimepicker-years {
        display: block;
      }
    }
  }
  table {
    margin: 0;
    tr {
      td {
        &.minute {
          &:hover {
            background: #eeeeee;
            cursor: pointer;
          }
        }
        &.hour {
          &:hover {
            background: #eeeeee;
            cursor: pointer;
          }
        }
        &.day {
          &:hover {
            background: #eeeeee;
            cursor: pointer;
          }
        }
        span {
          display: block;
          width: 23%;
          height: 54px;
          line-height: 54px;
          float: left;
          margin: 1%;
          cursor: pointer;
          -webkit-border-radius: 4px;
          -moz-border-radius: 4px;
          border-radius: 4px;
          &:hover {
            background: #eeeeee;
          }
          &.old {
            color: #999999;
          }
        }
      }
    }
  }
  .datetimepicker-hours {
    span {
      height: 26px;
      line-height: 26px;
    }
  }
  .datetimepicker-minutes {
    span {
      height: 26px;
      line-height: 26px;
    }
  }
  th {
    &.switch {
      width: 145px;
    }
  }
}

.datetimepicker-inline {
  width: 220px;
}

.datetimepicker-dropdown,
.datetimepicker-dropdown-left {
  top: 0;
  left: 0;
}

[class*="datetimepicker-dropdown"]:before {
  content: '';
  display: inline-block;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid #ccc;
  border-bottom-color: rgba(0, 0, 0, 0.2);
  position: absolute;
}

[class*="datetimepicker-dropdown"]:after {
  content: '';
  display: inline-block;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #ffffff;
  position: absolute;
}

[class*="datetimepicker-dropdown-top"]:before {
  content: '';
  display: inline-block;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid #ccc;
  border-top-color: rgba(0, 0, 0, 0.2);
  border-bottom: 0;
}

[class*="datetimepicker-dropdown-top"]:after {
  content: '';
  display: inline-block;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #ffffff;
  border-bottom: 0;
}

.datetimepicker-dropdown-bottom-left {
  &:before {
    top: -7px;
    right: 6px;
  }
  &:after {
    top: -6px;
    right: 7px;
  }
}

.datetimepicker-dropdown-bottom-right {
  &:before {
    top: -7px;
    left: 6px;
  }
  &:after {
    top: -6px;
    left: 7px;
  }
}

.datetimepicker-dropdown-top-left {
  &:before {
    bottom: -7px;
    right: 6px;
  }
  &:after {
    bottom: -6px;
    right: 7px;
  }
}

.datetimepicker-dropdown-top-right {
  &:before {
    bottom: -7px;
    left: 6px;
  }
  &:after {
    bottom: -6px;
    left: 7px;
  }
}

.datetimepicker td,
.datetimepicker th {
  text-align: center;
  width: 22px;
  height: 20px;
  padding: 3px 0px;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  border: none;
}

.table-striped .datetimepicker td,
.table-striped .datetimepicker th {
  background-color: transparent;
}

.datetimepicker td.old,
.datetimepicker td.new {
  color: #999999;
}

.datetimepicker td.disabled,
.datetimepicker td.disabled:hover {
  background: none;
  color: #999999;
  cursor: default;
}

.datetimepicker td.day.today {
  background-color: @color-warning;
  border-color: @color-warning;
  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  color: #fff;
}

.datetimepicker td.day.active {
  background-color: @color-primary;
  border-color: darken(@color-primary, 10%);
  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.datetimepicker td.day.active:hover {
  background-color: darken(@color-primary, 10%);
}

.datetimepicker td.day.today:hover,
.datetimepicker td.day.today.active:hover {
  background-color: darken(@color-warning, 10%);
}

.datetimepicker .datetimepicker-hours td span.hour_am,
.datetimepicker .datetimepicker-hours td span.hour_pm {
  width: 14.6%;
}

.datetimepicker .datetimepicker-hours fieldset legend,
.datetimepicker .datetimepicker-minutes fieldset legend {
  margin-bottom: inherit;
  line-height: 30px;
}

.datetimepicker td span.disabled,
.datetimepicker td span.disabled:hover {
  background: none;
  color: #999999;
  cursor: default;
}

.datetimepicker td span.active,
.datetimepicker td span.active:hover,
.datetimepicker td span.active.disabled,
.datetimepicker td span.active.disabled:hover {
  background-color: @color-primary;
  border-color: darken(@color-primary, 10%);
  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.datetimepicker thead tr:first-child th,
.datetimepicker tfoot tr:first-child th {
  cursor: pointer;
}

.datetimepicker thead tr:first-child th:hover,
.datetimepicker tfoot tr:first-child th:hover {
  background: #eeeeee;
}

.input-group.date > .input-group-addon {
  border-left: none;
}
.input-append.date .add-on i,
.input-prepend.date .add-on i,
.input-group.date .input-group-addon span {
  cursor: pointer;
  width: 14px;
  height: 14px;
}

.datetimepicker-only-time {
  table {width: 190px;}
  thead,
  tfoot {display: none;}
}
